/*
 * @Date: 2020-08-07 10:43:35
 * @LastEditors: xujianxing
 * @LastEditTime: 2020-08-07 10:52:11
 * @FilePath: \my-umi\src\wrappers\auth.tsx
 */

import { Redirect } from 'umi';
import React from 'react';

/**
 * signin auth module
 */
export default (props: any) => {
  const { isLogin } = { isLogin: false };
  if (isLogin) {
    return <>{props.children}</>;
  } else {
    return <Redirect to="/signin" />;
  }
};
